{% macro default(message, type, header) %}
    <div class="alert {{ type|default('alert-light') }}" {{ sylius_test_html_attribute('sylius-flash-message', type) }}>
        {% if type is not empty %}
            <div class="fw-bold">
                {{ header|default(type)|trans }}
            </div>
        {% endif %}
        {{ message|trans }}
    </div>
{% endmacro %}

{% macro info(message) %}
    {% import _self as messages %}
    {{ messages.default(message, 'alert-info', 'sylius.ui.info') }}
{% endmacro %}

{% macro success(message) %}
    {% import _self as messages %}
    {{ messages.default(message, 'alert-success', 'sylius.ui.success') }}
{% endmacro %}

{% macro error(message) %}
    {% import _self as messages %}
    {{ messages.default(message, 'alert-danger', 'sylius.ui.error') }}
{% endmacro %}
